//
//  UIImageView+Extend.m
//  MexicoLoan
//
//  Created by WXP on 2025/3/10.
//

#import "UIImageView+Extend.h"

@implementation UIImageView (Extend)

#pragma mark - UIImageView 赋值
- (void)sd_setImageWithUrlStr:(NSString *)urlStr placeholderImage:(NSString *)imgName{
    if(!isStr(urlStr)){
        return;
    }
    if([urlStr rangeOfString:@"http"].location == NSNotFound){
        urlStr = [NSString stringWithFormat:@"%@%@",ImageNationURL,urlStr];
    }
    urlStr = [urlStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
    [self sd_setImageWithURL:[NSURL URLWithString:urlStr] placeholderImage:isStr(imgName)?[UIImage imageNamed:imgName]:nil];
}


@end
